package com.haixiaoke.saas.repository.pojo;

import com.haixiaoke.saas.repository.core.BaseEntity;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;


/**
 * 账单规则与收费项目关系对象 biz_apartment_item_rule_ref
 *
 * @author qixi
 * @date 2023-06-16
 */
@Data
public class ApartmentItemRuleRef extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 默认
     */
    public static final Integer ITEM_TYPE_DEFAULT_ITEM = 1;
    /**
     * 订单独有
     */
    public static final Integer ITEM_TYPE_ORDER_ITEM = 2;

    /**
     * id
     */
    private Long refId;

    /**
     * 账单规则id
     */
    private Long ruleId;

    /**
     * 收费项目id
     */
    private Long itemId;

    /**
     * 收费项目类型: 1系统默认 2订单独有
     */
    @NotNull(message = "收费项目类型不能为空")
    private Integer itemType;

    /**
     * 收费项目名
     */
    @NotNull(message = "收费项目名不能为空")
    private String itemName;

    /**
     * 计量单位
     */
    @NotNull(message = "计量单位不能为空")
    private String itemUnit;

    /**
     * 单价
     */
    @NotNull(message = "单价不能为空")
    @Min(value = 0, message = "单价不能小于0")
    private Double unitPrice;

    private Long orgId;
    private String userId;
    private String orderId;

}
